/*
 * CVoc_Process.h
 *
 *  Created on: 2012-4-12
 *      Author: li.zhaoping
 */

#ifndef CVOC_PROCESS_H_
#define CVOC_PROCESS_H_

#include "CProcess.h"

class CVoc_Process: public CProcess {
	public:
		CVoc_Process();
		virtual ~CVoc_Process();
	public:
		virtual bool Init(CTaskCallback *cb = 0);
		virtual bool UnInit();
		virtual process_type_t GetProcessType(const char* strUrl,
				const char* strRuler);
		virtual bool ProcessBuffer(const char* buf, long bufsize, const char* strUrl,
				const char* strRuler);
		virtual bool ProcessFile(const char* sFile, const char* strUrl,
				const char* strRuler);
		virtual const char* GetRootRulerName();

	private:
		bool parserRoot(char* data, const char* strUrl,
				const char* strRuler);
		bool parserNode1(char* data, const char* strUrl,
				const char* strRuler);

	private:
		CTaskCallback *cb_;
		int *pcreRoot_;
		int *pcreRoot_1_;
		int *pcreRoot_2_;
		int *pcreNode1_;
		int *pcreNode1_1_;
		int *pcreNode1_2_;
		int *pcreNode2_;
};

#endif /* CVOC_PROCESS_H_ */
